/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.una.pol.ii.is2.domain.flota;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author markos
 */
@Embeddable
public class ModeloPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "mode_cod")
    private int modeCod;
    @Basic(optional = false)
    @Column(name = "mode_cod_marca")
    private int modeCodMarca;

    public ModeloPK() {
    }

    public ModeloPK(int modeCod, int modeCodMarca) {
        this.modeCod = modeCod;
        this.modeCodMarca = modeCodMarca;
    }

    public int getModeCod() {
        return modeCod;
    }

    public void setModeCod(int modeCod) {
        this.modeCod = modeCod;
    }

    public int getModeCodMarca() {
        return modeCodMarca;
    }

    public void setModeCodMarca(int modeCodMarca) {
        this.modeCodMarca = modeCodMarca;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) modeCod;
        hash += (int) modeCodMarca;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ModeloPK)) {
            return false;
        }
        ModeloPK other = (ModeloPK) object;
        if (this.modeCod != other.modeCod) {
            return false;
        }
        if (this.modeCodMarca != other.modeCodMarca) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.una.pol.ii.is2.domain.ModeloPK[modeCod=" + modeCod + ", modeCodMarca=" + modeCodMarca + "]";
    }

}
